import { get, post } from '@/utils/request';

class HomeAPI {
	/**轮播图*/
	static listCarousels(params: any) {
		return get(`/biz/capi/public/home/listCarousels`, params);
	}

	/**热门推荐*/
	static listPopRecommendRoutes(params: any) {
		return get(`/biz/capi/public/home/listPopRecommendRoutes`, params);
	}

	/**路线分页列表*/
	static getRoutePage(params: any) {
		return post(`/biz/capi/route/getRoutePage`, params);
	}

	/**获取路线详情*/
	static getRoute(routeId: any) {
		return get(`/biz/capi/route/getRoute/` + routeId);
	}
	
	/**创建订单*/
	static createOrder(params: any) {
		return post(`/biz/capi/order/create`, params);
	}

	/**获取分类*/
	static listRouteCategories() {
		return get(`/biz/capi/route/listRouteCategories`);
	}
}

export default HomeAPI;
